package nina.yiyou.entry

import groovy.transform.PackageScope
import nina.yiyou.entry.run.EntryArgParser
import nina.yiyou.entry.run.WorkshopEntryRunner
import nina.yiyou.entry.run.WorkshopErrorHandler

@PackageScope
class Main {

  static void main(String[] args) {
//    args = '--excel --entry nina.yiyou.salary.Main C:\\Users\\luj\\Desktop\\nina_yiyou\\nina_workshop\\ninaworkshop_yiyou1.0.xlsm'.split()
    def entryArg = new EntryArgParser(args).parse()

    try {
      new WorkshopEntryRunner(entryArg).run()

    } catch (Throwable t) {
      new WorkshopErrorHandler(t, entryArg).handle()
    }
  }
}
